using Webshop20.Application.DataTransferObjects;
namespace Webshop20.Presentation
{
    public class CompleteDataForm
    {
        //Common data
        private string firstName;
        private string lastName;
        private string eMail;
        private string street;
        private string postalCode;
        private string city;
        private string country;
        private string paymentMethod;
        private string id;

        //DirectDebitPart
        private string bankName;
        private string bankCode;
        private string accountHolder;
        private string accountName;

        public CompleteDataForm(string firstName, string lastName, string eMail, string street, string postalCode, string city, string country, string paymentMethod, object [] directDebitDataFour, string id)
        {
            this.firstName = firstName;
            this.id = id;
            this.paymentMethod = paymentMethod;
            this.country = country;
            this.city = city;
            this.postalCode = postalCode;
            this.street = street;
            this.eMail = eMail;
            this.lastName = lastName;

            bankName = (string)directDebitDataFour[0];
            bankCode = (string) directDebitDataFour[1];
            accountHolder = (string) directDebitDataFour[2];
            accountName = (string) directDebitDataFour[3];

        }

        public CompleteDataForm(CustomerDTO customer, object [] directDebitDataFour) 
            : this(
                    customer.FirstName, 
                    customer.LastName, 
                    customer.EMail, 
                    customer.Street, 
                    customer.PostalCode, 
                    customer.City, 
                    customer.Country, 
                    customer.PaymentMethod, 
                    directDebitDataFour,customer.Id.ToString()
            )
        {
            this.id = id;
        }

        public string Id
        {
            get { return id; }
        }

        public string AccountName
        {
            get { return accountName; }
        }

        public string AccountHolder
        {
            get { return accountHolder; }
        }

        public string BankCode
        {
            get { return bankCode; }
        }

        public string BankName
        {
            get { return bankName; }
        }

        public string PaymentMethod
        {
            get { return paymentMethod; }
        }

        public string Country
        {
            get { return country; }
        }

        public string City
        {
            get { return city; }
        }

        public string PostalCode
        {
            get { return postalCode; }
        }

        public string Street
        {
            get { return street; }
        }

        public string EMail
        {
            get { return eMail; }
        }

        public string LastName
        {
            get { return lastName; }
        }

        public string FirstName
        {
            get { return firstName; }
        }
    }
}